package com.ruibang.glass.produce.config;

import com.baomidou.mybatisplus.core.toolkit.Sequence;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * @Author: songJinKang
 * @CreateTime: 2023-11-22  20:34
 * @Description: TODO:ID生成器
 * @Version: 1.0
 */
@Configuration
public class SequenceConfig {

    @Bean
    public Sequence sequence() throws UnknownHostException {
        return new Sequence(InetAddress.getLocalHost());
    }

}
